package cn.hongwei.nacos.controller;

import cn.hongwei.nacos.context.InstanceResponse;
import cn.hongwei.nacos.param.NacosInfoParam;
import cn.hongwei.nacos.service.NacosInstancesService;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.web.bind.annotation.GetMapping;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RestController;

/**
 * @author Great
 * @email 1224028994@qq.com
 */
@RestController
@RequestMapping("/instances")
public class NacosInstancesController {

    @Autowired
    private NacosInstancesService nacosInstancesService;

    @GetMapping("obtainInstanceResponse")
    public InstanceResponse obtainInstanceResponse(NacosInfoParam nacosInfoParam){
        return nacosInstancesService.obtainInstanceResponse(nacosInfoParam);
    }
}
